package cn.suzhang.designpatterns.singleton;

/**
 * 饿汉式单例模式
 * 
 * @author zhangsu
 *
 */
public class EagerSingleton {
	/**
	 * 类加载时初始化对象，天然线程安全
	 */
	private static final EagerSingleton instance = new EagerSingleton();

	/**
	 * 
	 */
	private EagerSingleton() {
	};

	public static EagerSingleton getInstance() {
		return instance;
	}

}
